<%@ page language="java" pageEncoding="UTF-8"%>
<%@ page contentType="text/html; charset=UTF-8" isELIgnored="false"%>

<%@ page import="java.util.HashMap"%>
<%@page import="com.jytc.framework.commons.ResultInfos"%>
<%@page import="com.jytc.framework.constants.RequestNameConstants"%>

<%
ResultInfos resultInfo = null;
resultInfo = (ResultInfos)request.getAttribute(RequestNameConstants.RESULT_INFO);

%>

<c:if test="${!empty sessionScope.adminLoginToken}">

	<html>
		<head>
			<title>系统提示信息</title>
			<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
			<base target="_self">
		</head>
		<body bgColor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
			<form id="infoForm" action="" method="post">
			<%
							if (!resultInfo.getIsAlert()) {
						%>
			<!--程序设计代码开始-->
			<table width="530" height="315" border="0" cellpadding="0" cellspacing="0" align="center">
				<tr>
					<td align="center" valign="top" background="../images/main_prompt.gif">
						<table width="96%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td width="14%" height="120">
									&nbsp;
								</td>
								<td width="80%">
									&nbsp;
								</td>
								<td width="6%">
									&nbsp;
								</td>
							</tr>
							<tr>
								<td height="177">
									&nbsp;
								</td>
								<td align="left" valign="top">
									<span style="font-size: 14px; line-height: 24px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font COLOR="#FF0000"><b>信息提示：</b>
									</font> <%
 	if (resultInfo.getPromptInfo() != null) {
 %> <%=resultInfo.getPromptInfo()%> <%
 	}
 %> <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;页面正在跳转中，请等待...... <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a
										href="#" onclick="pageHandle();"><b><u><font color="#0000FF">点击这里</font> </u> </b> </a>，直接进行跳转！ </span>
									<br>
									<br>
									<br>
									<br>
								</td>
								<td>
									&nbsp;
								</td>
							</tr>
							<tr>
								<td>
									&nbsp;
								</td>
								<td>
									&nbsp;
								</td>
								<td>
									&nbsp;
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
			<BR>
			<!--程序设计代码结束-->
			<%
							}
						%>
			</form>
		</body>
	</html>

</c:if>


<%
	//超时提示信息
	if (resultInfo.getIsOverTime()) {
		if (resultInfo.getIsAlert()) {
			out.println("<script>alert('【系统提示】\\n\\n"
					+ resultInfo.getAlertInfo() + "');");
			out.println("	top.location='" + request.getContextPath()
					+ "/admin/jsp/login.jsp';");
			out.println("</script>");
		} else {
			out.println("<script>");
			out.println("function pageHandle(){");
			out.println("	top.location='" + request.getContextPath()
					+ "/admin/jsp/login.jsp';");
			out.println("}");
			out.println("setTimeout(\"pageHandle()\",3000);");
			out.println("</script>");
		}
		return;
	}

	//没有权限提示信息
	if (resultInfo.getIsPopedom()) {
		if (resultInfo.getIsAlert()) {
			out.println("<script>alert('【系统提示】\\n\\n"
					+ resultInfo.getAlertInfo() + "');");
			out.println("	history.back();");
			out.println("</script>");
		} else {
			out.println("<script>");
			out.println("function pageHandle(){");
			out.println("	history.back();");
			out.println("}");
			out.println("setTimeout(\"pageHandle()\",3000);");
			out.println("</script>");
		}
		return;
	}

	// 返回提示信息
	if (resultInfo.getIsBack()) {
		if (resultInfo.getIsAlert()) {
			out.println("<script>alert('【系统提示】\\n\\n"
					+ resultInfo.getAlertInfo() + "');");
			out.println("	history.back();");
			out.println("</script>");
		} else {
			out.println("<script>");
			out.println("function pageHandle(){");
			out.println("	history.back();");
			out.println("}");
			out.println("setTimeout(\"pageHandle()\",3000);");
			out.println("</script>");
		}
		return;
	}

	//关闭当前窗口
	if (resultInfo.getIsCloseWindow()) {
		if (resultInfo.getIsAlert()) {
			out.println("<script>alert('【系统提示】\\n\\n"
					+ resultInfo.getAlertInfo() + "');");
			out.println("	window.close();");
			out.println("</script>");
		} else {
			out.println("<script>");
			out.println("function pageHandle(){");
			out.println("	window.close();");
			out.println("}");
			out.println("setTimeout(\"pageHandle()\",3000);");
			out.println("</script>");
		}
		return;
	}

	//关闭当前窗口
	if (resultInfo.getIsOpenTopWindow()) {
		if (resultInfo.getIsAlert()) {
			out.println("<script>alert('【系统提示】\\n\\n"
					+ resultInfo.getAlertInfo() + "');");
			out.println("	window.top.location.href = '"
					+ request.getContextPath()
					+ resultInfo.getGotoUrlForward() + "';");
			out.println("</script>");
		} else {
			out.println("<script>");
			out.println("function pageHandle(){");
			out.println("	window.top.location.href = '"
					+ request.getContextPath()
					+ resultInfo.getGotoUrlForward() + "';");
			out.println("}");
			out.println("setTimeout(\"pageHandle()\",3000);");
			out.println("</script>");
		}
		return;
	}

	//前进跳转提示信息
	if (resultInfo.getIsRedirect()) {
		if (resultInfo.getIsAlert()) {
			out.println("<script>alert('【系统提示】\\n\\n"
					+ resultInfo.getAlertInfo() + "');");
			out.println("	window.location = '"
					+ request.getContextPath()
					+ resultInfo.getGotoUrlForward() + "';");
			out.println("</script>");
		} else {

			out.println("<script>");
			out.println("function pageHandle(){");
			out.println("	window.infoForm.action = '"
					+ resultInfo.getGotoUrlForward() + "';");
			out.println("	window.infoForm.submit(); ");
			out.println("}");
			out.println("setTimeout(\"pageHandle()\",3000);");
			out.println("</script>");
		}
		return;
	}

	//是否刷新父窗口







	if (resultInfo.getIsRefreshParentWindow()) {
		if (resultInfo.getIsAlert()) {
			out.println("<script>alert('【系统提示】\\n\\n"
					+ resultInfo.getAlertInfo() + "');");
			out
					.println("	parent.window.location.href = parent.window.location.href;");
			out.println("</script>");
		} else {
			out.println("<script>");
			out.println("function pageHandle(){");
			out
					.println("	parent.window.location.href = parent.window.location.href;");
			out.println("}");
			out.println("setTimeout(\"pageHandle()\",3000);");
			out.println("</script>");
		}
		return;
	}

	//是否刷新创始者窗口







	if (resultInfo.getIsRefreshOpenerWindow()) {
		if (resultInfo.getIsAlert()) {
			out.println("<script>alert('【系统提示】\\n\\n"
					+ resultInfo.getAlertInfo() + "');");
			out
					.println("opener.window.location.href = opener.window.location.href;");
			out.println("</script>");
		} else {
			out.println("<script>");
			out.println("function pageHandle(){");
			out
					.println("	opener.window.location.href = opener.window.location.href;");
			out.println("}");
			out.println("setTimeout(\"pageHandle()\",3000);");
			out.println("</script>");
		}
		return;
	}

	//
%>

